<%
metamodel http://www.eclipse.org/uml2/2.0.0/UML

import services.StringServices
import services.Uml2Services
%>

<%script type="Class" name="fullFilePath"%>
<%if (hasStereotype("Entity")){%>
/<%entity_package.toPath()%>/<%name%>.java
<%}%>

<%script type="Class" name="generate" file="<%fullFilePath%>"%>
<%-- Generación de la clase JDO --%>
package <%entity_package%>;

import com.google.appengine.api.datastore.Key;
import java.io.Serializable;
import javax.persistence.*;

/**
 * <%ownedComment.body%>
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "<%name%>")
<%if (isExtended()){%>
@MappedSuperclass
<%}%>
public class <%name%><%extensions%> implements Serializable {

<%if (extensions.length() == 0){%>
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
	private Key key;
	
	public Key getKey() {
		return key;
	}	
<%}%>

	/**
	 * Constructor por defecto 
	 */
	public <%name%>() {
	}
<%generateAccessors()%>
<%generateAssociationAccessors()%>
}
<%script type="Class" name="entity_package"%>
<%base_package%>.<%package.name%>
<%-- Configuración del paquete --%>
<%script type="Class" name="base_package"%>
edu.idei.anteweb
<%script type="Class" name="extensions"%>
<%-- Manage extensions --%>
<%if (superClass.nSize() == 1){%> extends <%general.name%><%}else{%> <%}%>